//
//  KLSGBrifSpeakController.m
//  KaoLaShiGuangFM
//
//  Created by lanou3g on 15/10/31.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "KLSGBrifSpeakController.h"

@interface KLSGBrifSpeakController ()

@end

@implementation KLSGBrifSpeakController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    // Do any additional setup after loading the view.
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.view.frame];
    [imageView sd_setImageWithURL:[NSURL URLWithString:[self.dic valueForKey:@"backgroundLogo"]] placeholderImage:nil];
    imageView.alpha = 0.5;
    [self.view addSubview:imageView];
    
    
    UILabel *speakLable = [[UILabel alloc] initWithFrame:CGRectMake((kScreenWidth - 200) / 2, 100, 200, 50)];
    speakLable.text = [NSString stringWithFormat:@"创建人: %@" ,[self.dic valueForKey:@"nickname"]];
    [self.view addSubview:speakLable];
    
    UILabel *tagsLable = [[UILabel alloc] initWithFrame:CGRectMake((kScreenWidth - 200) / 2, CGRectGetMaxY(speakLable.frame), 200, 50)];
    tagsLable.text = [NSString stringWithFormat:@"认证: %@", [self.dic valueForKey:@"ptitle"] ];
    [self.view addSubview:tagsLable];
    
    UILabel *brifLable = [[UILabel alloc] initWithFrame:CGRectMake((kScreenWidth - 200) / 2, CGRectGetMaxY(tagsLable.frame), 200, 300)];
    brifLable.text = [NSString stringWithFormat:@"简介: %@", [self.dic valueForKey:@"personalSignature"]];
    brifLable.font = [UIFont systemFontOfSize:16];
    brifLable.numberOfLines = 0;
    [self.view addSubview:brifLable];
    
    NSDictionary *dic = [NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:16] forKey:NSFontAttributeName];
    CGRect frame = [brifLable.text boundingRectWithSize:CGSizeMake(200, 20000) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    CGRect newFrame = brifLable.frame;
    newFrame.size.height = frame.size.height;
    brifLable.frame = newFrame;
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
